nums = [3,6,1,0]
def dominantIndex(nums):
    info=[]
    for i in range(len(nums)):
        info.append([i,nums[i]])
    info.sort(key=lambda x:x[1])
    print(info)
    #排序
    if len(nums)<=1:
        return 0
    if nums[len(nums)-1]>=2*nums[len(nums)-2]:
        return nums[len(nums)-1]
    else:
        return -1
print(dominantIndex(nums))